package kr.hkit.powerjava.chapter6.work;

import java.util.Scanner;

public class programming5 {
	public static void main(String[] args) {
		int x;
			
		
		Scanner input = new Scanner(System.in);
		System.out.println("x 값을 입력하시오.(x는 실수)");
		x = input.nextInt();
		
		if(x <=0)
			System.out.println(x*x*x - 9*x + 2);
		if(x > 0)
			System.out.println(7*x + 2);
					
		
	}

}
